import request from '@/utils/request'
// 列表
export function GetListAPI(params) {
  return request({
    url: '/order/procurement-plan/list',
    method: 'GET',
    params
  })
}

// 添加单据
export function AddDataAPI(data) {
  return request({
    url: '/order/procurement-plan/add',
    method: 'POST',
    data
  })
}

// 提交审核
export function SubmitReviewAPI(data) {
  return request({
    url: '/order/procurement-plan/submitReview',
    method: 'POST',
    data
  })
}

// 撤销审核
export function DeleteReviewAPI(data) {
  return request({
    url: '/order/procurement-plan/deleteReview/' + data,
    method: 'GET'
  })
}

// 关结
export function ClosePlanAPI(data) {
  return request({
    url: '/order/procurement-plan/closePlan',
    method: 'POST',
    data
  })
}

// 删除
export function DelDataAPI(data) {
  return request({
    url: '/order/procurement-plan/delete/' + data,
    method: 'DELETE'
  })
}

// 修改
export function EditDataAPI(data) {
  return request({
    url: '/order/procurement-plan/update',
    method: 'POST',
    data
  })
}

// 查看详情
export function DetailDataAPI(data) {
  return request({
    url: '/order/procurement-plan/view/' + data,
    method: 'GET'
  })
}

// 单据明细列表
export function GetPlanListAPI(params) {
  return request({
    url: '/order/procurement-plan-detail/list',
    method: 'GET',
    params
  })
}

// 计划下达数据回显
export function GetPlanDetailAPI(data) {
  return request({
    url: '/order/procurement-plan-detail/planReleaseView/' + data,
    method: 'GET'
  })
}

// 计划下达
export function PlanReleaseAPI(data) {
  return request({
    url: '/order/procurement-plan-detail/planRelease',
    method: 'POST',
    data
  })
}

// 撤回
export function BackPlanAPI(data) {
  return request({
    url: '/order/procurement-plan/backPlan/' + data,
    method: 'GET'
  })
}

// 计划确认
export function PlanConfirmationAPI(data) {
  return request({
    url: '/order/purchase-order/planConfirmation',
    method: 'POST',
    data
  })
}

// 审核
export function ToExamineAPI(data) {
  return request({
    url: '/order/procurement-plan/purchaseReview',
    method: 'POST',
    data
  })
}
